package com.baichang.taoshunda.utils;

import cn.jpush.api.push.PushClient;
import cn.jpush.api.push.PushResult;
import cn.jpush.api.push.model.Message;
import cn.jpush.api.push.model.Options;
import cn.jpush.api.push.model.Platform;
import cn.jpush.api.push.model.PushPayload;
import cn.jpush.api.push.model.audience.Audience;
import com.baichang.framework.utils.ConfigurationHandle;
import com.baichang.framework.utils.JPushHelper;

import java.util.List;

public class CompanyJPushHelper extends JPushHelper {

    private String secret;
    private String key;
    private boolean isDev;

    private String configName = "business.properties";

    public CompanyJPushHelper() {
        init();
    }

    public CompanyJPushHelper(String configName) {
        this.configName = configName;
        init();
    }

    private void init() {
        ConfigurationHandle configurationHandle = new ConfigurationHandle(configName);
        secret = configurationHandle.getStringValue("secret");
        key = configurationHandle.getStringValue("key");
        isDev = configurationHandle.getStringValue("isApns").equals("1");
    }


}
